<template>
  <!-- 挂号管理 -->
  <div class="app-container">

    <el-table v-loading="loading" :data="userList">
      <el-table-column label="挂号单号" align="center" key="registno" prop="registno"/>
      <el-table-column label="患者id" align="center" key="patientId" prop="patientId"/>
      <el-table-column label="创建时间" align="center" key="creadtime" prop="creadtime"/>
      <el-table-column label="就诊状态" align="center" key="del" prop="del">
        <template slot-scope="scope">
          <div v-if="scope.row.del==0">未完成</div>
          <div v-if="scope.row.del==1">已完成</div>
          <!--0未完成1已完成-->
        </template>
      </el-table-column>
      <el-table-column label="协议状态" align="center" key="authstatus" prop="authstatus">
        <template slot-scope="scope">
          <div v-if="scope.row.authstatus==0">未签</div>
          <div v-if="scope.row.authstatus==1">已签</div>
          <!--0未完成1已完成-->
        </template>
      </el-table-column>
    </el-table>
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />

  </div>
</template>

<script>
import { searchList} from '@/api/credit/registerList'

export default {
  components: {},
  name: 'patient',
  dicts: [],
  data() {
    return {
      // 遮罩层
      loading: true,


      // 总条数
      total: 0,
      // 用户表格数据
      userList: null,


      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,

      },

    }
  },
  created() {
    this.getList()
  },
  methods: {
    /** 查询用户列表 */
    getList() {
      this.loading = true
      searchList(this.queryParams).then(response => {
          this.userList = response.rows
          this.total = response.total
          this.loading = false
        }
      )
    },


  }
}
</script>
